package com.nstar.base.effects
{
	import mx.effects.Sequence;
	
	/**
	 * 将背景色高亮的特效
	 * 
	 * @author 李嘉陵
	 * @date 2007.3.2
	 */
	public class HighLightSequence extends Sequence
	{
		private var _baseColor:uint = 0xffffff;
		private var _highColor:uint = 0xfff7a0;
		private var _duration:Number = 1000;
		
		var beginEffect:HighLight;
		var endEffect:HighLight;
	
		public var targetObj:* = null ;
		
		public function set baseColor(value:uint):void {
			beginEffect.beginColor = value;
			endEffect.endColor = value;
		}
		
		public function set highColor(value:uint):void {
			beginEffect.endColor = value;
			endEffect.beginColor = value;
		}
		
		override public function set duration(value:Number):void {
			//super.duration(value);
			
			beginEffect.duration = value;
			endEffect.duration = value;
		}
		
		public function HighLightSequence(targetObj:* = null) {
			super(targetObj);
			beginEffect = new HighLight(targetObj);
			endEffect = new HighLight(targetObj);
		
			beginEffect.beginColor = _baseColor;
			beginEffect.endColor = _highColor;
			beginEffect.duration = _duration;
			
			endEffect.beginColor = _highColor;
			endEffect.endColor = _baseColor;
			endEffect.duration = _duration;

			this.children.push(beginEffect);
			this.children.push(endEffect);
			
		}
	}
}